/*****************************************************************************/
/*                        >>> func_socket.h <<<                              */
/*	Trabajo Practico 2do. cuatrimestre 2011                                  */
/*	TP:"FUSELAJE"                                                            */
/*	GRUPO: Reduce Fat Fast                                                   */
/*	INTEGRANTES: Emanuel Genovese                                            */
/*               Federico Gabriel Garcia                                     */
/*               Federico Pioli                                              */
/*               Esther Insfrain                                             */
/*               Luciano Bagattin                                            */
/*	Fecha UM:                                                                */
/*****************************************************************************/

#ifndef FUNC_SOCKET_H
#define FUNC_SOCKET_H
/*****************************************************************************/
/*		        	Include					                                 */
/*****************************************************************************/
#include "log.h"
/*****************************************************************************/
/*		        	HEADERS					                                 */
/*****************************************************************************/
int fPrepararSocket(
		char* sPuerto_local_para_el_socket /*NULL para que el puerto sea random*/,
		char* sIP_local, char* sFuncion_Socket, int reutilizar, char * sFileLog,
		char *process, t_log *log);
int fEscuchar(int iDescriptor_del_socket, int cantConecciones, char * sFileLog,
		char *process, t_log *log);

int fCerrar(int iDescriptor_del_socket, char * sFileLog, char *process,
		t_log *log);

int fEnviar(int iSocket, char *respuesta);

int fConectar(int iPuerto, char * sIp, char * sFileLog, char *process,
		t_log *log);

int fPrepararSocket_UN(t_log *log, char * process);

int fConectar_UN(int iDescriptor_del_socket, char *process, t_log *log,
		char *sPath);

int fEscuchaSocketUN(int iDescriptor_del_socket, char * sNombreProceso,
		t_log *log, char *sPath);

#endif /*FUNC_SOCKET_H*/
